Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK: Refactor Validator translations to Neos.Neos.Ui package #3614

Draft
wants to merge 2 commits into
base: 9.0
Choose a base branch
from

Conversation

crydotsnake
Copy link
Member

@crydotsnake crydotsnake commented Sep 8, 2023

What I did

I added the translations of our validators from the Neos.Neos package directly too the Neos.Neos.Ui package.

How I did it

Moved the translations over, and adjusted the Validator Components to load the correct translations.

How to verify it

Checkout this PR in combination with: neos/neos-development-collection#4493

and add a Validator to your NodeType. You should see, that the translation is still working.

@crydotsnake crydotsnake force-pushed the task/refactor-validator-translations-from-neos-package branch from ddb62c8 to 03eba86 Compare September 8, 2023 23:39
@crydotsnake crydotsnake changed the title TASK: Refactor UI Validator translations to Neos.Neos.Ui package TASK: Refactor Validator translations to Neos.Neos.Ui package Sep 8, 2023
@mhsdesign
Copy link
Member

There is a failing unit test caused by this change (see the end of the console output):

Summary of all failing tests
FAIL packages/neos-ui-validators/src/Count/index.spec.js
  ● [1, 2, 3, 4] should result in an error message for min: 1 max: 3

    expect(received).toEqual(expected) // deep equality

    - Expected  - 0
    + Received  + 2

      Object {
        "id": "content.inspector.validators.countValidator.countBetween",
    +   "packageKey": "Neos.Neos.Ui",
        "params": Object {
          "maximum": 3,
          "minimum": 1,
        },
    +   "sourceName": "Main",
      }

      at Object.<anonymous> (packages/neos-ui-validators/src/Count/<stdin>:66:26)


Test Suites: 1 failed, 134 passed, 135 total
Tests:       1 failed, 708 passed, 709 total
Snapshots:   50 passed, 50 total
Time:        140.399 s
Ran all test suites.

@crydotsnake
Copy link
Member Author

Now e2e are failing 😅

@mhsdesign
Copy link
Member

Well thats why they dont work yet ^^ (see 9.0 branch) #3546

@crydotsnake
Copy link
Member Author

Ahh i see :) So this PR should be fine then.

@mhsdesign
Copy link
Member

ill give you my approval after we have merged the e2e ;) maybe they also cover the labels somewhere ^^

@mhsdesign
Copy link
Member

@crydotsnake you can now rebase this pr or merge master and the tests should be green ;)

@crydotsnake crydotsnake force-pushed the task/refactor-validator-translations-from-neos-package branch from afe8ecf to 40d3a07 Compare September 23, 2023 13:05
@crydotsnake
Copy link
Member Author

Green light ;) @mhsdesign

Copy link
Contributor

@dlubitz dlubitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the translation we use Weblate.

We are just allowed to change the EN-files in the code and Weblate will catch them up and create the corresponding keys in other languages.

Not sure how to proceed with this "move" of keys, but I guess there is something in weblate to do so. Otherwise we have to copy them there manually.

See also: neos/neos-development-collection#4493 (comment)

@mhsdesign
Copy link
Member

FYI found this issue which might be solved #2421

@mhsdesign mhsdesign marked this pull request as draft May 3, 2024 07:51
@mhsdesign mhsdesign removed their request for review May 3, 2024 07:51
@bwaidelich
Copy link
Member

What's the state with this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants